﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BGM_Approval.aspx.cs" Inherits="KPIS.GERP.GBMS.APP_UI.BGM_Approval" %>

<%@ Register src="../Controls/Combo/YearCombo.ascx" tagname="year" tagprefix="uc8" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head id="Head1" runat="server">
<link rel="Stylesheet" href="../../Styles/StyleSheet.css" type="text/css">
</head>
	<body>
	    <form id="form1" method="post" runat="server">
	    
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="None"  > 
        </telerik:RadAjaxLoadingPanel>
        
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="ShowAll">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="gridProject" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="gridProjectByOption" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="gridSource" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="gridMarket" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="gridProduct" LoadingPanelID="RadAjaxLoadingPanel1" />
                   </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="cbProject">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="gridProject" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="gridProjectByOption" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="gridProject">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="gridSource" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="gridMarket" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="gridProduct" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="lbControlID" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="lbStrategy" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="btnEditExpense" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="gridProject" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="gridProjectByOption" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="gridSource" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="gridMarket" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="gridProduct" LoadingPanelID="RadAjaxLoadingPanel1" />
                   </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

		
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">

                function openProjectDetails(sid) {

                    var hid = document.getElementById("<%= hdHeaderID.ClientID %>").value;
                    var type = document.getElementById("<%= hdType.ClientID %>").value;

                    if (type == "md") {

                        radopen("BGM_Approval_Edit_Expense.aspx?hid=" + hid + "&sid=" + sid + "&type=" + type, "ApprovalExpense");
                    }
                    else if (type == "rc") {
                    
                        radopen("BGM_Receive_Edit_Expense.aspx?hid=" + hid + "&sid=" + sid + "&type=" + type, "ApprovalExpense");
                    }
                }

                function closeRadWindow(sender, args) {
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest('refresh');
                }

                function isNumberKey(event) 
                {
                 var charCode = (event.which) ? event.which : event.keyCode
                 if(charCode > 31 && (charCode < 48 || charCode > 57)){
                     return false;
                  }
                 return true;
                }

                var cancelDropDownClosing = false;

                function onTextChange(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
                } 
                function StopPropagation(e) {
                    e.cancelBubble = true;
                    if (e.stopPropagation) {
                        e.stopPropagation();
                    }
                }

                function OnClientDropDownClosingHandler(sender, e) {
                    e.set_cancel(cancelDropDownClosing);
                }


        </script>
    </telerik:RadCodeBlock>
    
    <telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false" 
        ReloadOnShow="true" runat="server" Skin="WebBlue" Modal="true" KeepInScreenBounds="false" Style="z-index: 7001">
        <Windows>
            <telerik:RadWindow ID="ApprovalExpense" runat="server" Width="940px" Height="500px" Behaviors="Reload, Close" OnClientClose="closeRadWindow" KeepInScreenBounds="false">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>  
        
        <div class="bigModuleFull480">
        <div class="bigModuleBottomFull480">
            <div class="defaultFont">
<%--            <asp:Panel ID="panelHeader" runat="server">
                <div class="header-grid">
                </div>
            </asp:Panel>--%>
            <asp:Panel ID="panel_Item1" runat="server" Height="500px" CssClass="defaultFont" ScrollBars="Auto">
                    <asp:Label ID="lbControlID" runat="server" Text="" Visible="true"></asp:Label>                                            
                    <asp:HiddenField ID="hdType" runat="server"></asp:HiddenField>
                    <asp:HiddenField ID="hdHeaderID" runat="server"></asp:HiddenField>
                    <table cellpadding="0" cellspacing="0" style="width: 98%; font-family: 'Segoe UI'; font-size: 13px;">
                        <tr>
                            <td align="center">
                                <table cellpadding="0" cellspacing="0" class="defaultTable">
                                    <tr>
                                        <td align="right" width="55%">
                                            <table cellpadding="0" cellspacing="0" class="defaultTable">
                                                <tr valign="top">
                                                    <td width="30%" style="border-bottom-width: 1px; border-bottom-color: #CCCCCC; border-bottom-style: groove; padding-left: 5px; padding-bottom: 2px; padding-top: 10px;">
                                                        หัวข้อการพิจารณา :&nbsp;
                                                    </td>
                                                    <td style="border-bottom-width: 1px; border-bottom-color: #CCCCCC; border-bottom-style: groove; padding-bottom: 2px; padding-top: 10px;">
                                                        <asp:Label ID="lbHeaderName" runat="server" Text="-"></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr valign="top">
                                                    <td width="30%" style="border-bottom-width: 1px; border-bottom-color: #CCCCCC; border-bottom-style: groove; padding-left: 5px; padding-bottom: 2px; padding-top: 10px;">
                                                        รายละเอียด:&nbsp;
                                                    </td>
                                                    <td style="border-bottom-width: 1px; border-bottom-color: #CCCCCC; border-bottom-style: groove; padding-bottom: 2px; padding-top: 10px;">
                                                        <asp:Label ID="lbHeaderDescr" runat="server" Text="-"></asp:Label>
                                                    </td>
                                                </tr>                                            
                                            </table>
                                        </td>
                                        <td style="padding-left: 20px;">
                                            <table cellpadding="0" cellspacing="0" class="defaultTable">
                                                <tr valign="top">
                                                    <td width="30%" style="border-bottom-width: 1px; border-bottom-color: #CCCCCC; border-bottom-style: groove; padding-left: 5px; padding-bottom: 2px; padding-top: 10px;">
                                                        ปีงบประมาณ :&nbsp;
                                                    </td>
                                                    <td style="border-bottom-width: 1px; border-bottom-color: #CCCCCC; border-bottom-style: groove; padding-bottom: 2px; padding-top: 10px;">
                                                        <asp:Label ID="lbBgmYear" runat="server" Text="2554"></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="30%" style="border-bottom-width: 1px; border-bottom-color: #CCCCCC; border-bottom-style: groove; padding-left: 5px; padding-bottom: 2px; padding-top: 10px;">
                                                        กิจกรรมย่อย :&nbsp;
                                                    </td>
                                                    <td style="border-bottom-width: 1px; border-bottom-color: #CCCCCC; border-bottom-style: groove; padding-bottom: 2px; padding-top: 10px;">
                                                        <table cellpadding="0" cellspacing="0" style="width: 100%; font-family: 'Segoe UI'; font-size: 13px;">
                                                        <tr>
                                                            <td width="70%">
                                                                <asp:Label ID="lbStrategy" runat="server" Text="-"></asp:Label>
                                                            </td>
                                                            <td align="right">
                                                                &nbsp;<asp:LinkButton ID="ShowAll" runat="server" CssClass="LinkButton" OnClick="ShowAll_Click">&nbsp;&nbsp;ทั้งหมด</asp:LinkButton>
                                                            </td>
                                                        </tr>
                                                        </table>
                                                        
                                                    </td>
                                                </tr>
                                           </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td valign="top" width="55%" style="padding-top: 30px;" >
                                            <telerik:RadGrid GroupingSettings-CaseSensitive="false" ID="gridProject" runat="server" OnSelectedIndexChanged="gridProject_SelectedIndexChanged"
                                                AutoGenerateColumns="False" OnItemDataBound="gridProject_ItemDataBound" 
                                                GridLines="None" MasterTableView-GridLines="None" ClientSettings-EnablePostBackOnRowClick="true"
                                                Width="100%">
                                                <mastertableview ShowFooter="true" ShowGroupFooter="true" NoMasterRecordsText="... ไม่มีข้อมูล ..." commanditemdisplay="none" width="100%" GroupLoadMode="Client" GroupsDefaultExpanded="false">                                                           
                                                <Columns>
                                                    <telerik:GridBoundColumn DataField="bgm_strat_list_name" Visible="false"
                                                        FilterControlWidth="100%" HeaderStyle-HorizontalAlign="Center" 
                                                        HeaderText="ยุทธศาสตร์" ItemStyle-HorizontalAlign="Left" 
                                                        UniqueName="bgm_strat_list_name" >
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Left" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="bgm_strat_list_seq" Visible="false"
                                                        FilterControlWidth="100%" HeaderStyle-HorizontalAlign="Center" 
                                                        HeaderText="รหัสยุทธศาสตร์" ItemStyle-HorizontalAlign="Left" 
                                                        UniqueName="bgm_strat_list_seq" >
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Left" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="name"
                                                        FilterControlWidth="100%" HeaderStyle-HorizontalAlign="Center" 
                                                        HeaderText="กิจกรรมย่อย" ItemStyle-HorizontalAlign="Left" 
                                                        UniqueName="name" >
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Left" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="total_amount"
                                                        Aggregate="Sum"
                                                        FooterText="รวมทั้งหมด : "
                                                        DataFormatString="{0:#,##0.00}"
                                                        HeaderStyle-HorizontalAlign="Center"
                                                        HeaderText="เสนอขอ"
                                                        UniqueName="total_amount" Visible="true">
                                                        <HeaderStyle HorizontalAlign="Center" Width="80px"/>
                                                        <FooterStyle HorizontalAlign="Right" />
                                                        <ItemStyle HorizontalAlign="Right" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="approve_amount"
                                                        Aggregate="Sum"
                                                        FooterText="รวมทั้งหมด : "
                                                        DataFormatString="{0:#,##0.00}"
                                                        HeaderStyle-HorizontalAlign="Center"
                                                        HeaderText="ผ่านการพิจารณา"
                                                        UniqueName="approve_amount" Visible="true">
                                                        <HeaderStyle HorizontalAlign="Center" Width="80px"/>
                                                        <FooterStyle HorizontalAlign="Right" />
                                                        <ItemStyle HorizontalAlign="Right" />
                                                    </telerik:GridBoundColumn>
<%--                                                    <telerik:GridTemplateColumn AllowFiltering="false" visible="true">
                                                        <HeaderStyle Width="23px"></HeaderStyle>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="DetailControl" BorderWidth="0px" ImageUrl="../Image/Grid/Magnifier.gif" CommandName="DetailClick"
                                                                AlternateText="แสดงรายละเอียด" Style="float: right; cursor: pointer;" runat="server">
                                                            </asp:ImageButton>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>--%>
                                                </Columns>
                                                </mastertableview>
                                                <clientsettings>
                                                    <clientevents /><selecting allowrowselect="True" />
                                                </clientsettings>
                                            </telerik:RadGrid>
                                            <br /><br />
                                            <telerik:RadGrid GroupingSettings-CaseSensitive="false" ID="gridProjectByOption" runat="server" OnSelectedIndexChanged="gridProjectByOption_SelectedIndexChanged"
                                                AutoGenerateColumns="False" OnItemDataBound="gridProjectByOption_ItemDataBound"
                                                GridLines="None" MasterTableView-GridLines="None" 
                                                Width="100%">
                                                <mastertableview ShowFooter="true" ShowGroupFooter="true" NoMasterRecordsText="... ไม่มีข้อมูล ..." commanditemdisplay="none" width="100%" GroupLoadMode="Client" GroupsDefaultExpanded="false">                                                           
                                                <Columns>
                                                    <telerik:GridBoundColumn DataField="name"
                                                        FilterControlWidth="100%" HeaderStyle-HorizontalAlign="Center" 
                                                        HeaderText="โครงการบูรณาการ" ItemStyle-HorizontalAlign="Left" 
                                                        UniqueName="name" >
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Left" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="total_amount"
                                                        Aggregate="Sum"
                                                        FooterText="รวมทั้งหมด : "
                                                        DataFormatString="{0:#,##0.00}"
                                                        HeaderStyle-HorizontalAlign="Center"
                                                        HeaderText="เสนอขอ"
                                                        UniqueName="total_amount" Visible="true">
                                                        <HeaderStyle HorizontalAlign="Center" Width="80px"/>
                                                        <FooterStyle HorizontalAlign="Right" />
                                                        <ItemStyle HorizontalAlign="Right" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="approve_amount"
                                                        Aggregate="Sum"
                                                        FooterText="รวมทั้งหมด : "
                                                        DataFormatString="{0:#,##0.00}"
                                                        HeaderStyle-HorizontalAlign="Center"
                                                        HeaderText="ผ่านการพิจารณา"
                                                        UniqueName="approve_amount" Visible="true">
                                                        <HeaderStyle HorizontalAlign="Center" Width="80px"/>
                                                        <FooterStyle HorizontalAlign="Right" />
                                                        <ItemStyle HorizontalAlign="Right" />
                                                    </telerik:GridBoundColumn>
<%--                                                    <telerik:GridTemplateColumn AllowFiltering="false" visible="true">
                                                        <HeaderStyle Width="23px"></HeaderStyle>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="DetailControl" BorderWidth="0px" ImageUrl="../Image/Grid/Magnifier.gif" CommandName="DetailClick"
                                                                AlternateText="แสดงรายละเอียด" Style="float: right; cursor: pointer;" runat="server">
                                                            </asp:ImageButton>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>--%>
                                                </Columns>
                                                </mastertableview>
                                                <clientsettings>
                                                    <clientevents /><selecting allowrowselect="True" />
                                                </clientsettings>
                                            </telerik:RadGrid>
                                        </td>
                                        <td valign="top" align="right" style="padding-left: 20px; padding-top: 30px;">
                                            <telerik:RadGrid GroupingSettings-CaseSensitive="false" ID="gridSource" runat="server"
                                                AutoGenerateColumns="False" OnItemDataBound="gridSource_ItemDataBound"
                                                GridLines="None" MasterTableView-GridLines="None" 
                                                Width="100%">
                                                <mastertableview ShowFooter="true" NoMasterRecordsText="... ไม่มีข้อมูล ..." commanditemdisplay="none" datakeynames="bgm_source_seq" width="100%">                                                           
                                                <Columns>
                                                    <telerik:GridTemplateColumn AllowFiltering="false" visible="false">
                                                        <HeaderStyle Width="23px"></HeaderStyle>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="DetailControl" BorderWidth="0px" ImageUrl="../Image/Grid/Magnifier.gif" OnClientClick='<%# string.Format("return openProjectDetails(\"{0}\"); return fasle;", Eval("bgm_source_seq")) %>'
                                                                AlternateText="แสดงรายละเอียด" Style="float: right; cursor: pointer;" runat="server">
                                                            </asp:ImageButton>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn Visible="false">
                                                        <ItemTemplate>
                                                            <asp:Label ID="Sequence" runat="server" Text='<%# Eval("bgm_source_seq") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                    </telerik:GridTemplateColumn> 
                                                    <telerik:GridTemplateColumn HeaderStyle-Width="70%" Visible="false"
                                                        HeaderStyle-HorizontalAlign="Center" HeaderText="แหล่งเงิน" ItemStyle-HorizontalAlign="Left"> 
                                                        <ItemTemplate>
                                                            <asp:HyperLink ID="targetSource" runat="server" NavigateUrl="#" Text='<%# Eval("bgm_source_name") %>'></asp:HyperLink>
                                                        </ItemTemplate>
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                    </telerik:GridTemplateColumn> 
                                                    <telerik:GridBoundColumn DataField="bgm_source_name"
                                                        FilterControlWidth="100%" HeaderStyle-HorizontalAlign="Center" 
                                                        HeaderText="แหล่งเงิน" ItemStyle-HorizontalAlign="Left" 
                                                        UniqueName="bgm_source_name" >
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Left" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="total_amount" 
                                                        Aggregate="Sum"
                                                        FooterAggregateFormatString="{0:#,##0.00}"
                                                        DataFormatString="{0:#,##0.00}"
                                                        HeaderStyle-HorizontalAlign="Center"
                                                        HeaderText="เสนอขอ" 
                                                        UniqueName="total_amount" Visible="true">
                                                        <HeaderStyle HorizontalAlign="Center" Width="80px"/>
                                                        <FooterStyle HorizontalAlign="Right" />
                                                        <ItemStyle HorizontalAlign="Right" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="approve_amount" 
                                                        Aggregate="Sum"
                                                        FooterAggregateFormatString="{0:#,##0.00}"
                                                        DataFormatString="{0:#,##0.00}"
                                                        HeaderStyle-HorizontalAlign="Center"
                                                        HeaderText="ผ่านการพิจารณา" 
                                                        UniqueName="approve_amount" Visible="true">
                                                        <HeaderStyle HorizontalAlign="Center" Width="80px"/>
                                                        <FooterStyle HorizontalAlign="Right" />
                                                        <ItemStyle HorizontalAlign="Right" />
                                                    </telerik:GridBoundColumn>
                                                </Columns>
                                                </mastertableview>
                                                <clientsettings>
                                                    <clientevents /><selecting allowrowselect="True" /></clientsettings>
                                            </telerik:RadGrid>
                                            <br /><br />
                                            <telerik:RadGrid GroupingSettings-CaseSensitive="false" ID="gridMarket" runat="server"
                                                OnItemDataBound="gridMarket_ItemDataBound" 
                                                AutoGenerateColumns="False" GridLines="None" MasterTableView-GridLines="None" 
                                                Width="100%">
                                                <mastertableview ShowFooter="true" NoMasterRecordsText="... ไม่มีข้อมูล ..." commanditemdisplay="none" datakeynames="bgm_option_seq" width="100%">                                                           
                                                <Columns>
                                                    <telerik:GridBoundColumn DataField="bgm_option_name"
                                                        HeaderStyle-HorizontalAlign="Center" 
                                                        HeaderText="ตลาด(ภูมิภาค/ประเทศ)" ItemStyle-HorizontalAlign="Left" 
                                                        UniqueName="bgm_option_name">
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Left" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="weight" HeaderStyle-Width="15%"
                                                        Aggregate="Sum"
                                                        FooterAggregateFormatString="{0:#,##0}"
                                                        DataFormatString="{0:#,##0.000}"
                                                        HeaderStyle-HorizontalAlign="Center" 
                                                        HeaderText="น้ำหนัก" ItemStyle-HorizontalAlign="Right" 
                                                        UniqueName="weight">
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                        <FooterStyle HorizontalAlign="Right" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="total_amount" 
                                                        Aggregate="Sum"
                                                        FooterAggregateFormatString="{0:#,##0.00}"
                                                        DataFormatString="{0:#,##0.00}"
                                                        HeaderStyle-HorizontalAlign="Center"
                                                        HeaderText="เสนอขอ" 
                                                        UniqueName="total_amount" Visible="true">
                                                        <HeaderStyle HorizontalAlign="Center" Width="80px"/>
                                                        <FooterStyle HorizontalAlign="Right" />
                                                        <ItemStyle HorizontalAlign="Right" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="approve_amount" 
                                                        Aggregate="Sum"
                                                        FooterAggregateFormatString="{0:#,##0.00}"
                                                        DataFormatString="{0:#,##0.00}"
                                                        HeaderStyle-HorizontalAlign="Center"
                                                        HeaderText="ผ่านการพิจารณา" 
                                                        UniqueName="approve_amount" Visible="true">
                                                        <HeaderStyle HorizontalAlign="Center" Width="80px"/>
                                                        <FooterStyle HorizontalAlign="Right" />
                                                        <ItemStyle HorizontalAlign="Right" />
                                                    </telerik:GridBoundColumn>
                                                </Columns>
                                                </mastertableview>
                                            </telerik:RadGrid>
                                            <br /><br />
                                            <telerik:RadGrid GroupingSettings-CaseSensitive="false" ID="gridProduct" runat="server"
                                                OnItemDataBound="gridProduct_ItemDataBound" 
                                                AutoGenerateColumns="False" GridLines="None" MasterTableView-GridLines="None" 
                                                Width="100%">
                                                <mastertableview ShowFooter="true" NoMasterRecordsText="... ไม่มีข้อมูล ..." commanditemdisplay="none" datakeynames="bgm_option_seq" width="100%">                                                           
                                                <Columns>
                                                    <telerik:GridBoundColumn DataField="bgm_option_name"
                                                        HeaderStyle-HorizontalAlign="Center" 
                                                        HeaderText="สินค้า/บริการ" ItemStyle-HorizontalAlign="Left" 
                                                        UniqueName="bgm_option_name">
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Left" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="weight" HeaderStyle-Width="15%"
                                                        Aggregate="Sum"
                                                        FooterAggregateFormatString="{0:#,##0}"
                                                        DataFormatString="{0:#,##0.000}"
                                                        HeaderStyle-HorizontalAlign="Center" 
                                                        HeaderText="น้ำหนัก" ItemStyle-HorizontalAlign="Right" 
                                                        UniqueName="weight">
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                        <FooterStyle HorizontalAlign="Right" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="total_amount" 
                                                        Aggregate="Sum"
                                                        FooterAggregateFormatString="{0:#,##0.00}"
                                                        DataFormatString="{0:#,##0.00}"
                                                        HeaderStyle-HorizontalAlign="Center"
                                                        HeaderText="เสนอขอ" 
                                                        UniqueName="total_amount" Visible="true">
                                                        <HeaderStyle HorizontalAlign="Center" Width="80px"/>
                                                        <FooterStyle HorizontalAlign="Right" />
                                                        <ItemStyle HorizontalAlign="Right" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="approve_amount" 
                                                        Aggregate="Sum"
                                                        FooterAggregateFormatString="{0:#,##0.00}"
                                                        DataFormatString="{0:#,##0.00}"
                                                        HeaderStyle-HorizontalAlign="Center"
                                                        HeaderText="ผ่านการพิจารณา" 
                                                        UniqueName="approve_amount" Visible="true">
                                                        <HeaderStyle HorizontalAlign="Center" Width="80px"/>
                                                        <FooterStyle HorizontalAlign="Right" />
                                                        <ItemStyle HorizontalAlign="Right" />
                                                    </telerik:GridBoundColumn>
                                                </Columns>
                                                </mastertableview>
                                            </telerik:RadGrid>                                                                                    
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
            </asp:Panel>
		    </div>
		</div>
		</div>        
		</form>
	</body>
</html>
